Skip to content

Add configurable add-project shortcut - #4258

Open
colonelpanic8 wants to merge 9 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/add-project-shortcut
Open

Add configurable add-project shortcut#4258
colonelpanic8 wants to merge 9 commits into
pingdotgg:mainfrom
colonelpanic8:t3code/add-project-shortcut

Conversation

@colonelpanic8

@colonelpanic8 colonelpanic8 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • add Add project to the New thread in… view
  • introduce the configurable project.add keybinding with a default of alt+a
  • route the shortcut through the existing command-palette add-project flow and show the effective binding beside the action

Why

T3 Code already models user-facing shortcuts as named, configurable commands. Using that same system keeps shortcut conflict resolution, per-user overrides, and the Keybindings settings UI consistent instead of hard-coding a palette-only key. Plain Alt+A is unused by the app; Ctrl+A remains available for standard Select All behavior.

Validation

  • vp test packages/contracts/src/keybindings.test.ts apps/web/src/keybindings.test.ts apps/server/src/keybindings.test.ts
  • vp check
  • vp run typecheck

Exact-head evidence

Revalidated at ac10e74 on current main (9a0a071): focused tests, vp check, and vp run typecheck passed. The capture uses only disposable local projects.

Alt+A opens the Add project flow


Note

Low Risk
UI and keybinding changes only; no auth, data, or API surface changes beyond registering a new command name.

Overview
Adds a new project.add keybinding command (default alt+a, disabled while the terminal is focused) across contracts, shared defaults, and server bootstrap tests, so users can rebind it like other shortcuts.

The command palette now routes project.add to the existing add-project flow instead of only toggling the palette. shouldHandleCommandPaletteShortcut avoids stealing Alt+A from editors unless the palette is open (so the search field can still trigger add project). Add-project submenu state is tracked with flowBaseDepthRef and reset helpers so nested navigation and re-opening flows behave correctly.

Add project appears in the New thread in… picker (via buildNewThreadInGroups) with the shortcut label shown on the action.

Reviewed by Cursor Bugbot for commit 0dcb2e9. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add configurable project.add shortcut bound to Alt+A

  • Registers project.add as a valid keybinding command and maps it to alt+a by default (only when terminal is not focused) in packages/shared/src/keybindings.ts.
  • Updates the CommandPalette keydown handler to call openAddProject() when the resolved command is project.add, and suppresses the shortcut when focus is in an editable element.
  • Adds a new shouldHandleCommandPaletteShortcut helper in apps/web/src/components/CommandPalette.logic.ts that gates shortcut handling on command type and editable-target state.
  • Surfaces the "Add project" action in the command palette with a ⌥A shortcut label, including inside the "New thread in…" submenu.

Macroscope summarized 7c2a7f9.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ebb547f4-db00-4a4c-85c3-65872ac5883a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jul 22, 2026
Comment thread apps/web/src/components/CommandPalette.tsx
@macroscopeapp

macroscopeapp Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR adds a new user-facing keyboard shortcut (alt+a) for the add-project action. While well-implemented with tests, new features introducing user-facing behavior warrant human review.

You can customize Macroscope's approvability policy. Learn more.

Comment thread packages/shared/src/keybindings.ts
Comment thread packages/shared/src/keybindings.ts
Comment thread apps/web/src/components/CommandPalette.tsx Outdated
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Jul 22, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 22, 2026
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch from e7cb807 to 42b605f Compare July 22, 2026 12:06
Comment thread apps/web/src/components/CommandPalette.tsx Outdated
@macroscopeapp
macroscopeapp Bot dismissed their stale review July 22, 2026 12:19

Dismissing prior approval to re-evaluate 51e185e

@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch 3 times, most recently from 681668e to 48a7327 Compare July 22, 2026 16:22
Comment thread apps/web/src/components/CommandPalette.tsx
Comment thread apps/web/src/components/CommandPalette.tsx
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch from ac10e74 to b9a4196 Compare July 22, 2026 23:41
Comment thread apps/web/src/components/CommandPalette.tsx Outdated
Comment thread apps/web/src/components/CommandPalette.tsx Outdated
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch 9 times, most recently from 2e0cf21 to d1740c6 Compare July 23, 2026 22:38
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
… and pingdotgg#4599

The published build already carried pingdotgg#4605 and pingdotgg#4599 -- stack-build-info.json on
t3code/stack lists both -- but the manifest edits that admitted them were never
committed here, so the recorded intent had drifted from the artifact and a
rebuild would have dropped two features. Restore them at the OIDs the published
build resolved, then append pingdotgg#4624.

pingdotgg#4624 is closed upstream without merging; carried because the replay cost is
real on this phone. Its head carries a fix past the PR: the 200ms code-highlight
debounces could never fire, because a growing code block's React key encodes its
source offsets and the block remounts on every delta.

Also refresh two pins that the artifact had moved past (the thread-picker group
and local/nix-flake), and re-audit the exception set: the group rebuild at
c5a4a73 shrank the CommandPalette losses on pingdotgg#4263/pingdotgg#4258/pingdotgg#4426 from 29/28/19
to 3/3/4. pingdotgg#4590's waiver is rewritten -- its 32 missing lines are an unbuilt
branch revision, not a resolution loss, because the group is still pinned at the
older member head.
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch from 88cfcca to 7c2a7f9 Compare July 27, 2026 11:15
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
# Conflicts:
#	apps/web/src/components/CommandPalette.logic.test.ts
#	apps/web/src/components/CommandPalette.tsx
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
# Conflicts:
#	apps/web/src/components/CommandPalette.logic.test.ts
#	apps/web/src/components/CommandPalette.tsx
colonelpanic8 added a commit to colonelpanic8/t3code that referenced this pull request Jul 27, 2026
All 41 writable topics were rebased onto upstream b4680cb and force-pushed,
so every pin here moved. The thread-picker group was rebuilt at the new member
heads, which also clears the stale-pin gap that had pingdotgg#4590's newer revision
sitting in no build.

Two cumulative branches -- t3code/client-suite (37 commits) and
t3code/unify-environment-selection (41) -- were replayed as a single
content-identical commit each rather than rebased commit-by-commit. They rewrite
their own files repeatedly, so each intermediate replay conflicted against a
state present in no final tree and with no oracle to resolve it against; that is
how the sidebar host-name and accent-color features were lost once before.
Applying base..tip instead reproduced both contributions exactly -- verified line
for line: 113 files / 6269 added lines and 131 files / 6686 added lines, both
unchanged. Old heads are preserved under refs/refresh-backup/.

Removed stack/patches/t3code-command-palette-logic-helpers.patch from the group
manifest. It predated the members carrying those helpers themselves: it deleted
shouldHandleCommandPaletteShortcut and shouldClearAddProjectEnvironmentOnPop and
stripped isLoaded from resolveNewThreadOnIntent, while adding three helpers
nothing in the assembled tree calls. Once the members were rebased, the
assembled CommandPalette.tsx imported both deleted symbols, and the web build
failed with two MISSING_EXPORT errors. Dropping it also shrank the audited
CommandPalette losses on pingdotgg#4263/pingdotgg#4258/pingdotgg#4426 from 10/7/7 to 3/3/4.

Added patches/t3code-dedupe-environment-icon.patch. client-suite and
unify-environment-selection each add the same EnvironmentIcon helper to
BranchToolbarEnvironmentSelector.tsx; git merges both without conflict and the
result fails to parse. Genuinely stack-emergent, so it cannot live on either
topic. Only the esbuild syntax gate catches this class -- the content audit
looks for missing lines, not duplicated ones.

pingdotgg#4624 is now a branch-linked topic with no `pr` key: it was closed upstream
without merging, so the branch is authoritative and the entry must not be
dropped on account of the PR's state.

Ladder: syntax gate clean, content audit exits 0, nix build exits 0, smoke
check exits 0.
@colonelpanic8
colonelpanic8 force-pushed the t3code/add-project-shortcut branch from 7c2a7f9 to 0dcb2e9 Compare July 28, 2026 02:07
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant